package com.df.happylearn.request;

import com.df.happylearn.model.Article;
import com.df.happylearn.model.ArticleContent;

import org.json.JSONObject;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by dingfeng on 2016/8/12.
 */
public interface ApiService {

    // Get article list
    @GET(Api.URL_ARTICLE_LIST)
    Observable<HttpResult<List<Article>>> getArticle(@Query("cat_id") int cat_id, @Query("page") int page, @Query("size") int size);

    // Get article content
    @GET(Api.URL_ARTICLE_CONTENT)
    Observable<HttpResult<ArticleContent>> getArticleContent(@Query("article_id") int article_id);

}
